Imports CapaDeDatos
Public Class nImpRecRet
  Private  ImpRecRet as dImpRecRet= New dImpRecRet()
  Public Function Insertar(ByVal IdRetencion as String,ByVal IdRecibo as String) as BOOLEAN
     if IdRetencion <> "" and IdRecibo <> "" then 
       return ImpRecRet.Insertar(IdRetencion ,IdRecibo )
     End If
     Return false
  End Function
  Public Function Eliminar(ByVal IdImpRecRet as String) as BOOLEAN
     if IdImpRecRet <> "" then 
       return ImpRecRet.Eliminar(IdImpRecRet ) 
     End If
     Return false
    End Function
    Public Function EliminarRecibo(ByVal IdRecibo As String) As Boolean
        Dim exito = True
        Dim dtsImputaciones As DataSet = ImpRecRet.BuscarFiltrado("", "", IdRecibo)
        For Each row As DataRow In dtsImputaciones.Tables(0).Rows
            exito = exito And ImpRecRet.Eliminar(row("IdImpRecRet").ToString)
        Next
        Return exito
    End Function
  Public Function BuscarFiltrado(ByVal IdImpRecRet as String,ByVal IdRetencion as String,ByVal IdRecibo as String) as DATASET
     Return ImpRecRet.BuscarFiltrado(IdImpRecRet ,IdRetencion ,IdRecibo ) 
  End Function

End Class
